# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=choqok
pkgver=1.7.0
pkgrel=2
pkgdesc="A micro-blogging client"
url="https://choqok.kde.org/"
# armhf blocked by extra-cmake-modules
# s390x and riscv64 blocked by polkit -> kio
# ppc64le blocked by kaccounts-integration
arch="all !armhf !s390x !riscv64 !ppc64le"
license="GPL-2.0-only OR GPL-3.0-only"
makedepends="
	extra-cmake-modules
	kcmutils-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kdoctools-dev
	kemoticons-dev
	kglobalaccel-dev
	kguiaddons-dev
	ki18n-dev
	kio-dev
	knotifications-dev
	knotifyconfig-dev
	kparts-dev
	ktextwidgets-dev
	kwallet-dev
	kwidgetsaddons-dev
	kxmlgui-dev
	purpose-dev
	qca-dev
	qt5-qtbase-dev
	qt5-qtnetworkauth-dev
	samurai
	sonnet-dev
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://download.kde.org/stable/choqok/${pkgver%.*}/src/choqok-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	mkdir -p "$pkgdir"/usr/lib
	mv "$pkgdir"/usr/share/cmake "$pkgdir"/usr/lib
}

sha512sums="6f5998078e555f7b4a40270ad0a4defa2d15bb8440b810320fc4cfc38d78cb34bb9b2f6a38eb33eb3217b51a78a7fbc7f79224cd0ddb0fcbf8c9035d8e600e96  choqok-1.7.0.tar.xz"
